-------------------------------------------------------------------------------
Millie - Who Wants To Be A Millionaire? Question Editor by Labmaster
Version 1.0  2 January, 2006 - Windows Binary Release
Copyright (C) Labmaster 2005, 2006 and licensed under the GNU GPL

http://sourceforge.net/projects/millie/
-------------------------------------------------------------------------------

Contents
 - About
 - Game Support
 - Source Code
 - Usage
 - Script format
 - Limitations in this version
 - Error messages

About
-----

Millie is a cross-platform question editor for the Gameboy Advance series of
"Who Wants To Be A Millionaire?" games, written in ANSI C. I decided to write
it not so much because I thought people would use it (if someone does actually
use this, let me know ^_^), but because it would serve as a good opportunity
to practice my reverse engineering skills. The source code should also serve
as an example of one way of implementing an editor which includes 
decompression/ recompression functions, (though to be fair, there are probably 
better examples out there by people who know what their doing). If you're 
interested in finding out more about how the game works, and you can't figure 
it out from the source code, you can contact me at Acmlm's board - 
http://board.acmlm.org


Game Support
------------

This version of Millie supports the following editions of the game:
- UK Edition
- UK Edition 2
- Australian Edition

If you have another version of Who Wants To Be A Millionaire, please contact 
me via http://www.sourceforge.net/projects/millie/ so that support can be 
added.

Source Code
-----------
Millie is written in ANSI C. Source code for this program can be found at
http://www.sourceforge.net/projects/millie/. Instructions on compiling are
included in the tarball.

Usage
-----
Millie is a command line program. If you are using Windows, you will need
to open a command prompt (Start->Run, enter 'cmd' for Win NT/2K/2000, or 
'command' for 95/98), or use the batch files provided. Input and output is via
stdin and stdout, so you should use redirection when extracting or inserting
scripts. For example:

> millie x rom.gba > output.txt

will extract the script from 'rom.gba' to 'output.txt', and

> millie i rom.gba < script.txt

inserts 'script.txt' into 'rom.gba'. Alternatively, you can use the batch files
'insert.bat' and 'extract.bat' to automate this process. Before doing so, 
right-click on the batch files, click edit, and follow the instructions within
to customize them for your set up.

Script format
-------------

The script format is pretty straightforward. Comments start with a '#'. Each
question comprises six elements, each on a separate line. There must _not_ be
a space between the start of the line and text, as the parser uses the first
character of each line to determine what to do with it.

1. Level directive
 The level directive is enclosed between two braces, and tells the game the
 difficulty level of the following question. Although questions in the official
 game are only assigned one difficulty level, as the engine supports questions
 to be of multi difficulties, Millie will allow you to assign multiple levels
 for a question. Levels are represented by the numbers 1-15, and correspond to
 the following question levels in the game:
 
 1  - $100
 2  - $200
 3  - $300
 4  - $500 
 5  - $1,000
 6  - $2,000
 7  - $4,000
 8  - $8,000
 9  - $16,000
 10 - $32,000
 11 - $64,000
 12 - $125,000
 13 - $250,000
 14 - $500,000
 15 - $1,000,000
 
 Levels should be separated by a comma, e.g.:
 
[1, 2, 3, 4]

 assigns the following question to the $100 through to $500 dollar levels.
 

2. Question assignment

Q = <question>

Rather self-explanatory.


3. Answer assignment

A = <answer>

Ditto.


4. Option assigned

O2 = <option>
O3 = <option>
O4 = <option>

A is obviously the correct answer, O2, O3 and O4 are the other three options
to be provided.

For an example script, please refer to example.script.txt which is contained
in this directory.


Limitations in this version
---------------------------

This version of Millie does not support inserting scripts with more questions
than the original ROM. This is simply because doing so would require modifying
the engine to allow this (the question index and difficulty tables are not
as easy to repoint as the rest of the data). If you really would like this
feature, post a feature request at the Sourceforge page and if I have the time,
I'll see if I can implement it. Other than fixing small bugs that crop up, I'm
basically done with this project.


Error Messages
--------------

Most error messages generated by Millie should be pretty self-explanatory.
Below is extended information on two errors. which you may encounter.

"Illegal character encountered near line..."
Millie does not support the extension or editing of the game's font, thus you 
cannot create questions with characters that are not supported by the game.
Millie will not return the actual line number that the character was on, but
instead the line of the level directive immediately after it (as questions/
answers are only encoded when an entire question block has been read).

NOTE: Some text editors may create problems when editing an extracted script.
For example, the Australian edition script contains a question with an 
accented 'e' - if you open this file then save with some text editors then
attempt to re-insert this script into a game, Millie will generate an error.
If you cannot use another text editor, your only option is to replace the
offending character with one supported by your editor.

"Error encoding key..."
Millie has encountered a word that was not processed when the compression
dictionary was being compiled. In theory, this should not occur, but if you
do receive this error, submit a bug report at
http://www.sourceforge.net/projects/millie/ . Please attach a copy of the
script you were trying to insert.


If you encounter any other problems whilst using the problem, please post a
bug report at Sourceforge.
-------------------------------------------------------------------------------